package com.mcxx.modules.temporary.family.service.read;

import com.mcxx.modules.temporary.family.dao.read.TmpFamilyMainReadDao;
import com.mcxx.modules.temporary.family.dto.TempFamilyDTO;
import com.mcxx.modules.temporary.family.entity.TmpFamilyMainBackUpEntity;
import com.mcxx.modules.temporary.family.entity.TmpFamilyMainEntity;
import com.mcxx.modules.temporary.fundpay.dto.TmpCapitalFundSaveObjectDTO;
import com.mcxx.modules.temporary.fundpay.entity.TmpFundPayEntity;
import com.mcxx.modules.temporary.fundpay.entity.TmpFundPayFamilyEntity;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@TaTransactional(readOnly = true)
public class TmpFamilyMainReadService {

    @Autowired
    private TmpFamilyMainReadDao familyMainReadDao;


    public List<TmpFamilyMainEntity> listAll() {
        return familyMainReadDao.listAll();
    }


    public TmpFamilyMainEntity getById(String id) {
        return familyMainReadDao.getById(id);
    }


    public TempFamilyDTO getByMemberIdCard(String idcard) {
        return familyMainReadDao.getByMemberIdCard(idcard);
    }


    public TmpFamilyMainBackUpEntity selectBackUpInfo(String orderId){
        return familyMainReadDao.selectBackUpInfo(orderId);
    }

    public List<String> selectNoBackUpFamily(List<String> familyIds){
        return familyMainReadDao.selectNoBackUpFamily(familyIds);
    }

    public List<String> selectNoBackUpFamilys(List<String> familyIds,List<String> orderIds){
        return familyMainReadDao.selectNoBackUpFamilys(familyIds,orderIds);
    }


    public String selectPhoneByFamilyId(String familyId){
        return familyMainReadDao.selectPhoneByFamilyId(familyId);
    }

    public List<TempFamilyDTO> getByMemberByApplyIdCard(String idCard) {
        return familyMainReadDao.getByMemberByApplyIdCard(idCard);
    }

    public TmpFamilyMainEntity getFamilyByIdCard(String idCard, String familyId) {
        return familyMainReadDao.getFamilyByIdCard(idCard, familyId);
    }
}
